<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>


<script>
    window.addEventListener('resize', function (e) {
        console.log(e);
        console.log('窗口变化了')
    })
</script>
</body>
</html>
